package com.ruoyi.record.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 问诊记录对象 record
 * 
 * @author ruoyi
 * @date 2024-04-24
 */
@Data
public class Record implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 病人ID */
    @Excel(name = "病人ID")
    private Long patientId;

    /** 医生ID */
    @Excel(name = "医生ID")
    private Long doctorId;

    /** 病人姓名 */
    @Excel(name = "病人姓名")
    private String name;

    /** 病人年龄 */
    @Excel(name = "病人年龄")
    private Long age;

    /** 病人性别 */
    @Excel(name = "病人性别")
    private Long sex;

    /** 病人病史 */
    @Excel(name = "病人病史")
    private String histories;

    /** 症状描述 */
    @Excel(name = "症状描述")
    private String symptoms;

    /** 诊断结果 */
    @Excel(name = "诊断结果")
    private String diagnosis;

    /** 治疗建议 */
    @Excel(name = "治疗建议")
    private String treatment;

    /** 创建人 */
    private Long createUser;

    /** 更新人 */
    private Long updateUser;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 请求参数 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params;

    /** 医生姓名 */
    @TableField(exist = false)
    private String staffName;

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

}
